<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <style>
        .flex-container {
          width: 100px;
          height: 200px;
          padding: 10px;
          background-color: skyblue;
          /* 弹性布局 */
          display: flex;
          /* flex-wrap  主轴方向和项目如何换行 */
          /* flex-flow: column wrap; */
          flex-flow: row wrap-reverse;
        }
        .flex-item {
          line-height: 50px;
          font-size: 30px;
          color: #fff;
          text-align: center;
          background-color: tomato;
          margin: 5px;
          padding: 5px 10px;
        }
      </style>
      <body>
        <div class="flex-container">
          <div class="flex-item">1</div>
          <div class="flex-item">2</div>
          <div class="flex-item">3</div>
          <div class="flex-item">4</div>
          <div class="flex-item">5</div>
        </div>
      </body>
</body>
</html>